home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / yahtze1a / frmmain.frm < prev    next >
Text File  |  1999-09-27  |  64KB  |  2,010 lines

  1. VERSION 5.00
  2. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  3. Begin VB.Form frmMain 
  4.    BackColor       =   &H00C0C0C0&
  5.    BorderStyle     =   1  'Fixed Single
  6.    Caption         =   "Yahtzee Deluxe"
  7.    ClientHeight    =   4860
  8.    ClientLeft      =   5565
  9.    ClientTop       =   2760
  10.    ClientWidth     =   4800
  11.    BeginProperty Font 
  12.       Name            =   "MS Sans Serif"
  13.       Size            =   8.25
  14.       Charset         =   0
  15.       Weight          =   700
  16.       Underline       =   0   'False
  17.       Italic          =   0   'False
  18.       Strikethrough   =   0   'False
  19.    EndProperty
  20.    ForeColor       =   &H00C0C0C0&
  21.    Icon            =   "frmMain.frx":0000
  22.    KeyPreview      =   -1  'True
  23.    LinkTopic       =   "Form1"
  24.    LockControls    =   -1  'True
  25.    MaxButton       =   0   'False
  26.    ScaleHeight     =   4860
  27.    ScaleWidth      =   4800
  28.    Begin VB.Frame Frame 
  29.       BackColor       =   &H00C0C0C0&
  30.       Height          =   400
  31.       Index           =   4
  32.       Left            =   2160
  33.       TabIndex        =   49
  34.       Top             =   4115
  35.       Width           =   2535
  36.       Begin VB.Label lblScores 
  37.          AutoSize        =   -1  'True
  38.          BackColor       =   &H00C0C0C0&
  39.          BackStyle       =   0  'Transparent
  40.          Caption         =   "Bonus Yahtzee"
  41.          BeginProperty Font 
  42.             Name            =   "MS Sans Serif"
  43.             Size            =   9.75
  44.             Charset         =   0
  45.             Weight          =   700
  46.             Underline       =   0   'False
  47.             Italic          =   0   'False
  48.             Strikethrough   =   0   'False
  49.          EndProperty
  50.          ForeColor       =   &H00800080&
  51.          Height          =   240
  52.          Index           =   13
  53.          Left            =   120
  54.          TabIndex        =   51
  55.          Top             =   130
  56.          Width           =   1920
  57.       End
  58.       Begin VB.Label lblNums 
  59.          AutoSize        =   -1  'True
  60.          BackColor       =   &H00C0C0C0&
  61.          BackStyle       =   0  'Transparent
  62.          Caption         =   "X"
  63.          BeginProperty Font 
  64.             Name            =   "MS Sans Serif"
  65.             Size            =   9.75
  66.             Charset         =   0
  67.             Weight          =   700
  68.             Underline       =   0   'False
  69.             Italic          =   0   'False
  70.             Strikethrough   =   0   'False
  71.          EndProperty
  72.          ForeColor       =   &H00800080&
  73.          Height          =   240
  74.          Index           =   13
  75.          Left            =   2055
  76.          TabIndex        =   50
  77.          Top             =   130
  78.          Width           =   150
  79.       End
  80.    End
  81.    Begin VB.Frame Frame 
  82.       BackColor       =   &H00C0C0C0&
  83.       BeginProperty Font 
  84.          Name            =   "MS Sans Serif"
  85.          Size            =   8.25
  86.          Charset         =   0
  87.          Weight          =   400
  88.          Underline       =   0   'False
  89.          Italic          =   0   'False
  90.          Strikethrough   =   0   'False
  91.       EndProperty
  92.       Height          =   570
  93.       Index           =   1
  94.       Left            =   120
  95.       TabIndex        =   8
  96.       Top             =   1200
  97.       Width           =   3255
  98.       Begin MSComctlLib.ProgressBar pBar 
  99.          Height          =   225
  100.          Left            =   75
  101.          TabIndex        =   52
  102.          Top             =   210
  103.          Width           =   2265
  104.          _ExtentX        =   3995
  105.          _ExtentY        =   397
  106.          _Version        =   393216
  107.          Appearance      =   1
  108.          Max             =   13
  109.          Scrolling       =   1
  110.       End
  111.       Begin VB.Label lblRollNumber 
  112.          AutoSize        =   -1  'True
  113.          BackColor       =   &H00C0C0C0&
  114.          BackStyle       =   0  'Transparent
  115.          Caption         =   "0"
  116.          Height          =   195
  117.          Left            =   2970
  118.          TabIndex        =   48
  119.          Top             =   225
  120.          Width           =   120
  121.       End
  122.       Begin VB.Label lblStatic 
  123.          AutoSize        =   -1  'True
  124.          BackColor       =   &H00C0C0C0&
  125.          BackStyle       =   0  'Transparent
  126.          Caption         =   "Roll #"
  127.          ForeColor       =   &H00C00000&
  128.          Height          =   195
  129.          Index           =   0
  130.          Left            =   2400
  131.          TabIndex        =   25
  132.          Top             =   225
  133.          Width           =   525
  134.       End
  135.    End
  136.    Begin VB.Frame Frame 
  137.       BackColor       =   &H00C0C0C0&
  138.       BeginProperty Font 
  139.          Name            =   "MS Sans Serif"
  140.          Size            =   8.25
  141.          Charset         =   0
  142.          Weight          =   400
  143.          Underline       =   0   'False
  144.          Italic          =   0   'False
  145.          Strikethrough   =   0   'False
  146.       EndProperty
  147.       Height          =   2295
  148.       Index           =   3
  149.       Left            =   2160
  150.       TabIndex        =   7
  151.       Top             =   1830
  152.       Width           =   2535
  153.       Begin VB.Label lblNums 
  154.          AutoSize        =   -1  'True
  155.          BackColor       =   &H00C0C0C0&
  156.          BackStyle       =   0  'Transparent
  157.          Caption         =   "X"
  158.          BeginProperty Font 
  159.             Name            =   "MS Sans Serif"
  160.             Size            =   9.75
  161.             Charset         =   0
  162.             Weight          =   700
  163.             Underline       =   0   'False
  164.             Italic          =   0   'False
  165.             Strikethrough   =   0   'False
  166.          EndProperty
  167.          ForeColor       =   &H00000000&
  168.          Height          =   240
  169.          Index           =   12
  170.          Left            =   2050
  171.          TabIndex        =   42
  172.          Top             =   2025
  173.          Width           =   150
  174.       End
  175.       Begin VB.Label lblNums 
  176.          AutoSize        =   -1  'True
  177.          BackColor       =   &H00C0C0C0&
  178.          BackStyle       =   0  'Transparent
  179.          Caption         =   "X"
  180.          BeginProperty Font 
  181.             Name            =   "MS Sans Serif"
  182.             Size            =   9.75
  183.             Charset         =   0
  184.             Weight          =   700
  185.             Underline       =   0   'False
  186.             Italic          =   0   'False
  187.             Strikethrough   =   0   'False
  188.          EndProperty
  189.          ForeColor       =   &H00000000&
  190.          Height          =   240
  191.          Index           =   11
  192.          Left            =   2050
  193.          TabIndex        =   41
  194.          Top             =   1710
  195.          Width           =   150
  196.       End
  197.       Begin VB.Label lblNums 
  198.          AutoSize        =   -1  'True
  199.          BackColor       =   &H00C0C0C0&
  200.          BackStyle       =   0  'Transparent
  201.          Caption         =   "X"
  202.          BeginProperty Font 
  203.             Name            =   "MS Sans Serif"
  204.             Size            =   9.75
  205.             Charset         =   0
  206.             Weight          =   700
  207.             Underline       =   0   'False
  208.             Italic          =   0   'False
  209.             Strikethrough   =   0   'False
  210.          EndProperty
  211.          ForeColor       =   &H00000000&
  212.          Height          =   240
  213.          Index           =   10
  214.          Left            =   2050
  215.          TabIndex        =   40
  216.          Top             =   1410
  217.          Width           =   150
  218.       End
  219.       Begin VB.Label lblNums 
  220.          AutoSize        =   -1  'True
  221.          BackColor       =   &H00C0C0C0&
  222.          BackStyle       =   0  'Transparent
  223.          Caption         =   "X"
  224.          BeginProperty Font 
  225.             Name            =   "MS Sans Serif"
  226.             Size            =   9.75
  227.             Charset         =   0
  228.             Weight          =   700
  229.             Underline       =   0   'False
  230.             Italic          =   0   'False
  231.             Strikethrough   =   0   'False
  232.          EndProperty
  233.          ForeColor       =   &H00000000&
  234.          Height          =   240
  235.          Index           =   9
  236.          Left            =   2050
  237.          TabIndex        =   39
  238.          Top             =   1095
  239.          Width           =   150
  240.       End
  241.       Begin VB.Label lblNums 
  242.          AutoSize        =   -1  'True
  243.          BackColor       =   &H00C0C0C0&
  244.          BackStyle       =   0  'Transparent
  245.          Caption         =   "X"
  246.          BeginProperty Font 
  247.             Name            =   "MS Sans Serif"
  248.             Size            =   9.75
  249.             Charset         =   0
  250.             Weight          =   700
  251.             Underline       =   0   'False
  252.             Italic          =   0   'False
  253.             Strikethrough   =   0   'False
  254.          EndProperty
  255.          ForeColor       =   &H00000000&
  256.          Height          =   240
  257.          Index           =   8
  258.          Left            =   2050
  259.          TabIndex        =   38
  260.          Top             =   780
  261.          Width           =   150
  262.       End
  263.       Begin VB.Label lblNums 
  264.          AutoSize        =   -1  'True
  265.          BackColor       =   &H00C0C0C0&
  266.          BackStyle       =   0  'Transparent
  267.          Caption         =   "X"
  268.          BeginProperty Font 
  269.             Name            =   "MS Sans Serif"
  270.             Size            =   9.75
  271.             Charset         =   0
  272.             Weight          =   700
  273.             Underline       =   0   'False
  274.             Italic          =   0   'False
  275.             Strikethrough   =   0   'False
  276.          EndProperty
  277.          ForeColor       =   &H00000000&
  278.          Height          =   240
  279.          Index           =   7
  280.          Left            =   2050
  281.          TabIndex        =   37
  282.          Top             =   480
  283.          Width           =   150
  284.       End
  285.       Begin VB.Label lblNums 
  286.          AutoSize        =   -1  'True
  287.          BackColor       =   &H00C0C0C0&
  288.          BackStyle       =   0  'Transparent
  289.          Caption         =   "X"
  290.          BeginProperty Font 
  291.             Name            =   "MS Sans Serif"
  292.             Size            =   9.75
  293.             Charset         =   0
  294.             Weight          =   700
  295.             Underline       =   0   'False
  296.             Italic          =   0   'False
  297.             Strikethrough   =   0   'False
  298.          EndProperty
  299.          ForeColor       =   &H00000000&
  300.          Height          =   240
  301.          Index           =   6
  302.          Left            =   2050
  303.          TabIndex        =   36
  304.          Top             =   165
  305.          Width           =   150
  306.       End
  307.       Begin VB.Label lblScores 
  308.          BackColor       =   &H00C0C0C0&
  309.          BackStyle       =   0  'Transparent
  310.          Caption         =   "Chance"
  311.          BeginProperty Font 
  312.             Name            =   "MS Sans Serif"
  313.             Size            =   9.75
  314.             Charset         =   0
  315.             Weight          =   700
  316.             Underline       =   0   'False
  317.             Italic          =   0   'False
  318.             Strikethrough   =   0   'False
  319.          EndProperty
  320.          Height          =   240
  321.          Index           =   12
  322.          Left            =   120
  323.          TabIndex        =   24
  324.          Top             =   2025
  325.          Width           =   1875
  326.       End
  327.       Begin VB.Label lblScores 
  328.          BackColor       =   &H00C0C0C0&
  329.          BackStyle       =   0  'Transparent
  330.          Caption         =   "Yahtzee"
  331.          BeginProperty Font 
  332.             Name            =   "MS Sans Serif"
  333.             Size            =   9.75
  334.             Charset         =   0
  335.             Weight          =   700
  336.             Underline       =   0   'False
  337.             Italic          =   0   'False
  338.             Strikethrough   =   0   'False
  339.          EndProperty
  340.          ForeColor       =   &H000000C0&
  341.          Height          =   240
  342.          Index           =   11
  343.          Left            =   120
  344.          TabIndex        =   23
  345.          Top             =   1725
  346.          Width           =   1935
  347.       End
  348.       Begin VB.Label lblScores 
  349.          BackColor       =   &H00C0C0C0&
  350.          BackStyle       =   0  'Transparent
  351.          Caption         =   "Large Straight"
  352.          BeginProperty Font 
  353.             Name            =   "MS Sans Serif"
  354.             Size            =   9.75
  355.             Charset         =   0
  356.             Weight          =   700
  357.             Underline       =   0   'False
  358.             Italic          =   0   'False
  359.             Strikethrough   =   0   'False
  360.          EndProperty
  361.          Height          =   240
  362.          Index           =   10
  363.          Left            =   120
  364.          TabIndex        =   22
  365.          Top             =   1410
  366.          Width           =   1755
  367.       End
  368.       Begin VB.Label lblScores 
  369.          BackColor       =   &H00C0C0C0&
  370.          BackStyle       =   0  'Transparent
  371.          Caption         =   "Small Straight"
  372.          BeginProperty Font 
  373.             Name            =   "MS Sans Serif"
  374.             Size            =   9.75
  375.             Charset         =   0
  376.             Weight          =   700
  377.             Underline       =   0   'False
  378.             Italic          =   0   'False
  379.             Strikethrough   =   0   'False
  380.          EndProperty
  381.          Height          =   240
  382.          Index           =   9
  383.          Left            =   120
  384.          TabIndex        =   21
  385.          Top             =   1095
  386.          Width           =   1935
  387.       End
  388.       Begin VB.Label lblScores 
  389.          BackColor       =   &H00C0C0C0&
  390.          BackStyle       =   0  'Transparent
  391.          Caption         =   "Full House"
  392.          BeginProperty Font 
  393.             Name            =   "MS Sans Serif"
  394.             Size            =   9.75
  395.             Charset         =   0
  396.             Weight          =   700
  397.             Underline       =   0   'False
  398.             Italic          =   0   'False
  399.             Strikethrough   =   0   'False
  400.          EndProperty
  401.          Height          =   240
  402.          Index           =   8
  403.          Left            =   120
  404.          TabIndex        =   20
  405.          Top             =   795
  406.          Width           =   1845
  407.       End
  408.       Begin VB.Label lblScores 
  409.          BackColor       =   &H00C0C0C0&
  410.          BackStyle       =   0  'Transparent
  411.          Caption         =   "4 of a kind"
  412.          BeginProperty Font 
  413.             Name            =   "MS Sans Serif"
  414.             Size            =   9.75
  415.             Charset         =   0
  416.             Weight          =   700
  417.             Underline       =   0   'False
  418.             Italic          =   0   'False
  419.             Strikethrough   =   0   'False
  420.          EndProperty
  421.          Height          =   240
  422.          Index           =   7
  423.          Left            =   120
  424.          TabIndex        =   19
  425.          Top             =   480
  426.          Width           =   1920
  427.       End
  428.       Begin VB.Label lblScores 
  429.          BackColor       =   &H00C0C0C0&
  430.          BackStyle       =   0  'Transparent
  431.          Caption         =   "3 of a kind"
  432.          BeginProperty Font 
  433.             Name            =   "MS Sans Serif"
  434.             Size            =   9.75
  435.             Charset         =   0
  436.             Weight          =   700
  437.             Underline       =   0   'False
  438.             Italic          =   0   'False
  439.             Strikethrough   =   0   'False
  440.          EndProperty
  441.          Height          =   240
  442.          Index           =   6
  443.          Left            =   120
  444.          TabIndex        =   18
  445.          Top             =   165
  446.          Width           =   1800
  447.       End
  448.    End
  449.    Begin VB.Frame Frame 
  450.       BackColor       =   &H00C0C0C0&
  451.       BeginProperty Font 
  452.          Name            =   "MS Sans Serif"
  453.          Size            =   8.25
  454.          Charset         =   0
  455.          Weight          =   400
  456.          Underline       =   0   'False
  457.          Italic          =   0   'False
  458.          Strikethrough   =   0   'False
  459.       EndProperty
  460.       Height          =   1050
  461.       Index           =   0
  462.       Left            =   120
  463.       TabIndex        =   6
  464.       Top             =   120
  465.       Width           =   4575
  466.       Begin MSComctlLib.ImageList ilDice 
  467.          Left            =   690
  468.          Top             =   465
  469.          _ExtentX        =   1005
  470.          _ExtentY        =   1005
  471.          BackColor       =   -2147483643
  472.          ImageWidth      =   32
  473.          ImageHeight     =   32
  474.          MaskColor       =   12632256
  475.          _Version        =   393216
  476.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  477.             NumListImages   =   6
  478.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  479.                Picture         =   "frmMain.frx":030A
  480.                Key             =   ""
  481.             EndProperty
  482.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  483.                Picture         =   "frmMain.frx":07EE
  484.                Key             =   ""
  485.             EndProperty
  486.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  487.                Picture         =   "frmMain.frx":0D02
  488.                Key             =   ""
  489.             EndProperty
  490.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  491.                Picture         =   "frmMain.frx":124E
  492.                Key             =   ""
  493.             EndProperty
  494.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  495.                Picture         =   "frmMain.frx":17CE
  496.                Key             =   ""
  497.             EndProperty
  498.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  499.                Picture         =   "frmMain.frx":1DB6
  500.                Key             =   ""
  501.             EndProperty
  502.          EndProperty
  503.       End
  504.       Begin MSComctlLib.ImageList ImageList1 
  505.          Left            =   1530
  506.          Top             =   465
  507.          _ExtentX        =   1005
  508.          _ExtentY        =   1005
  509.          BackColor       =   -2147483643
  510.          ImageWidth      =   73
  511.          ImageHeight     =   22
  512.          MaskColor       =   12632256
  513.          _Version        =   393216
  514.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  515.             NumListImages   =   7
  516.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  517.                Picture         =   "frmMain.frx":23A2
  518.                Key             =   ""
  519.             EndProperty
  520.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  521.                Picture         =   "frmMain.frx":2726
  522.                Key             =   ""
  523.             EndProperty
  524.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  525.                Picture         =   "frmMain.frx":2AA2
  526.                Key             =   ""
  527.             EndProperty
  528.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  529.                Picture         =   "frmMain.frx":2D32
  530.                Key             =   ""
  531.             EndProperty
  532.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  533.                Picture         =   "frmMain.frx":2FE6
  534.                Key             =   ""
  535.             EndProperty
  536.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  537.                Picture         =   "frmMain.frx":32E6
  538.                Key             =   ""
  539.             EndProperty
  540.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  541.                Picture         =   "frmMain.frx":35FE
  542.                Key             =   ""
  543.             EndProperty
  544.          EndProperty
  545.       End
  546.       Begin VB.CheckBox chkDice 
  547.          BackColor       =   &H00C0C0C0&
  548.          BeginProperty Font 
  549.             Name            =   "MS Sans Serif"
  550.             Size            =   8.25
  551.             Charset         =   0
  552.             Weight          =   400
  553.             Underline       =   0   'False
  554.             Italic          =   0   'False
  555.             Strikethrough   =   0   'False
  556.          EndProperty
  557.          Height          =   255
  558.          Index           =   4
  559.          Left            =   4000
  560.          TabIndex        =   4
  561.          TabStop         =   0   'False
  562.          Top             =   720
  563.          Width           =   195
  564.       End
  565.       Begin VB.CheckBox chkDice 
  566.          BackColor       =   &H00C0C0C0&
  567.          BeginProperty Font 
  568.             Name            =   "MS Sans Serif"
  569.             Size            =   8.25
  570.             Charset         =   0
  571.             Weight          =   400
  572.             Underline       =   0   'False
  573.             Italic          =   0   'False
  574.             Strikethrough   =   0   'False
  575.          EndProperty
  576.          Height          =   255
  577.          Index           =   3
  578.          Left            =   3090
  579.          TabIndex        =   3
  580.          TabStop         =   0   'False
  581.          Top             =   720
  582.          Width           =   195
  583.       End
  584.       Begin VB.CheckBox chkDice 
  585.          BackColor       =   &H00C0C0C0&
  586.          BeginProperty Font 
  587.             Name            =   "MS Sans Serif"
  588.             Size            =   8.25
  589.             Charset         =   0
  590.             Weight          =   400
  591.             Underline       =   0   'False
  592.             Italic          =   0   'False
  593.             Strikethrough   =   0   'False
  594.          EndProperty
  595.          Height          =   255
  596.          Index           =   2
  597.          Left            =   2180
  598.          TabIndex        =   2
  599.          TabStop         =   0   'False
  600.          Top             =   720
  601.          Width           =   195
  602.       End
  603.       Begin VB.CheckBox chkDice 
  604.          BackColor       =   &H00C0C0C0&
  605.          BeginProperty Font 
  606.             Name            =   "MS Sans Serif"
  607.             Size            =   8.25
  608.             Charset         =   0
  609.             Weight          =   400
  610.             Underline       =   0   'False
  611.             Italic          =   0   'False
  612.             Strikethrough   =   0   'False
  613.          EndProperty
  614.          Height          =   255
  615.          Index           =   1
  616.          Left            =   1270
  617.          TabIndex        =   1
  618.          TabStop         =   0   'False
  619.          Top             =   720
  620.          Width           =   195
  621.       End
  622.       Begin VB.CheckBox chkDice 
  623.          BackColor       =   &H00C0C0C0&
  624.          BeginProperty Font 
  625.             Name            =   "MS Sans Serif"
  626.             Size            =   8.25
  627.             Charset         =   0
  628.             Weight          =   400
  629.             Underline       =   0   'False
  630.             Italic          =   0   'False
  631.             Strikethrough   =   0   'False
  632.          EndProperty
  633.          Height          =   255
  634.          Index           =   0
  635.          Left            =   360
  636.          TabIndex        =   0
  637.          TabStop         =   0   'False
  638.          Top             =   720
  639.          Width           =   195
  640.       End
  641.       Begin VB.Label labClick 
  642.          BackStyle       =   0  'Transparent
  643.          Height          =   855
  644.          Index           =   4
  645.          Left            =   3800
  646.          TabIndex        =   47
  647.          Top             =   120
  648.          Width           =   615
  649.       End
  650.       Begin VB.Label labClick 
  651.          BackStyle       =   0  'Transparent
  652.          Height          =   855
  653.          Index           =   3
  654.          Left            =   2880
  655.          TabIndex        =   46
  656.          Top             =   120
  657.          Width           =   615
  658.       End
  659.       Begin VB.Label labClick 
  660.          BackStyle       =   0  'Transparent
  661.          Height          =   855
  662.          Index           =   2
  663.          Left            =   1950
  664.          TabIndex        =   45
  665.          Top             =   120
  666.          Width           =   615
  667.       End
  668.       Begin VB.Label labClick 
  669.          BackStyle       =   0  'Transparent
  670.          Height          =   855
  671.          Index           =   1
  672.          Left            =   1080
  673.          TabIndex        =   44
  674.          Top             =   120
  675.          Width           =   615
  676.       End
  677.       Begin VB.Label labClick 
  678.          BackStyle       =   0  'Transparent
  679.          Height          =   855
  680.          Index           =   0
  681.          Left            =   120
  682.          TabIndex        =   43
  683.          Top             =   120
  684.          Width           =   615
  685.       End
  686.       Begin VB.Image imgDice 
  687.          Height          =   495
  688.          Index           =   1
  689.          Left            =   1120
  690.          Top             =   190
  691.          Width           =   495
  692.       End
  693.       Begin VB.Image imgDice 
  694.          Height          =   495
  695.          Index           =   2
  696.          Left            =   2030
  697.          Top             =   190
  698.          Width           =   495
  699.       End
  700.       Begin VB.Image imgDice 
  701.          Height          =   495
  702.          Index           =   3
  703.          Left            =   2940
  704.          Top             =   190
  705.          Width           =   495
  706.       End
  707.       Begin VB.Image imgDice 
  708.          Height          =   495
  709.          Index           =   4
  710.          Left            =   3850
  711.          Top             =   195
  712.          Width           =   495
  713.       End
  714.       Begin VB.Image imgDice 
  715.          Height          =   495
  716.          Index           =   0
  717.          Left            =   210
  718.          Top             =   195
  719.          Width           =   495
  720.       End
  721.    End
  722.    Begin VB.Frame Frame 
  723.       BackColor       =   &H00C0C0C0&
  724.       BeginProperty Font 
  725.          Name            =   "MS Sans Serif"
  726.          Size            =   8.25
  727.          Charset         =   0
  728.          Weight          =   400
  729.          Underline       =   0   'False
  730.          Italic          =   0   'False
  731.          Strikethrough   =   0   'False
  732.       EndProperty
  733.       Height          =   2055
  734.       Index           =   2
  735.       Left            =   135
  736.       TabIndex        =   5
  737.       Top             =   1830
  738.       Width           =   1935
  739.       Begin VB.Label lblNums 
  740.          AutoSize        =   -1  'True
  741.          BackColor       =   &H00C0C0C0&
  742.          BackStyle       =   0  'Transparent
  743.          Caption         =   "X"
  744.          BeginProperty Font 
  745.             Name            =   "MS Sans Serif"
  746.             Size            =   9.75
  747.             Charset         =   0
  748.             Weight          =   700
  749.             Underline       =   0   'False
  750.             Italic          =   0   'False
  751.             Strikethrough   =   0   'False
  752.          EndProperty
  753.          ForeColor       =   &H00000000&
  754.          Height          =   240
  755.          Index           =   5
  756.          Left            =   1560
  757.          TabIndex        =   35
  758.          Top             =   1730
  759.          Width           =   150
  760.       End
  761.       Begin VB.Label lblNums 
  762.          AutoSize        =   -1  'True
  763.          BackColor       =   &H00C0C0C0&
  764.          BackStyle       =   0  'Transparent
  765.          Caption         =   "X"
  766.          BeginProperty Font 
  767.             Name            =   "MS Sans Serif"
  768.             Size            =   9.75
  769.             Charset         =   0
  770.             Weight          =   700
  771.             Underline       =   0   'False
  772.             Italic          =   0   'False
  773.             Strikethrough   =   0   'False
  774.          EndProperty
  775.          ForeColor       =   &H00000000&
  776.          Height          =   240
  777.          Index           =   4
  778.          Left            =   1560
  779.          TabIndex        =   34
  780.          Top             =   1416
  781.          Width           =   150
  782.       End
  783.       Begin VB.Label lblNums 
  784.          AutoSize        =   -1  'True
  785.          BackColor       =   &H00C0C0C0&
  786.          BackStyle       =   0  'Transparent
  787.          Caption         =   "X"
  788.          BeginProperty Font 
  789.             Name            =   "MS Sans Serif"
  790.             Size            =   9.75
  791.             Charset         =   0
  792.             Weight          =   700
  793.             Underline       =   0   'False
  794.             Italic          =   0   'False
  795.             Strikethrough   =   0   'False
  796.          EndProperty
  797.          ForeColor       =   &H00000000&
  798.          Height          =   240
  799.          Index           =   3
  800.          Left            =   1560
  801.          TabIndex        =   33
  802.          Top             =   1102
  803.          Width           =   150
  804.       End
  805.       Begin VB.Label lblNums 
  806.          AutoSize        =   -1  'True
  807.          BackColor       =   &H00C0C0C0&
  808.          BackStyle       =   0  'Transparent
  809.          Caption         =   "X"
  810.          BeginProperty Font 
  811.             Name            =   "MS Sans Serif"
  812.             Size            =   9.75
  813.             Charset         =   0
  814.             Weight          =   700
  815.             Underline       =   0   'False
  816.             Italic          =   0   'False
  817.             Strikethrough   =   0   'False
  818.          EndProperty
  819.          ForeColor       =   &H00000000&
  820.          Height          =   240
  821.          Index           =   2
  822.          Left            =   1560
  823.          TabIndex        =   32
  824.          Top             =   788
  825.          Width           =   150
  826.       End
  827.       Begin VB.Label lblNums 
  828.          AutoSize        =   -1  'True
  829.          BackColor       =   &H00C0C0C0&
  830.          BackStyle       =   0  'Transparent
  831.          Caption         =   "X"
  832.          BeginProperty Font 
  833.             Name            =   "MS Sans Serif"
  834.             Size            =   9.75
  835.             Charset         =   0
  836.             Weight          =   700
  837.             Underline       =   0   'False
  838.             Italic          =   0   'False
  839.             Strikethrough   =   0   'False
  840.          EndProperty
  841.          ForeColor       =   &H00000000&
  842.          Height          =   240
  843.          Index           =   1
  844.          Left            =   1560
  845.          TabIndex        =   27
  846.          Top             =   480
  847.          Width           =   150
  848.       End
  849.       Begin VB.Label lblNums 
  850.          AutoSize        =   -1  'True
  851.          BackColor       =   &H00C0C0C0&
  852.          BackStyle       =   0  'Transparent
  853.          Caption         =   "X"
  854.          BeginProperty Font 
  855.             Name            =   "MS Sans Serif"
  856.             Size            =   9.75
  857.             Charset         =   0
  858.             Weight          =   700
  859.             Underline       =   0   'False
  860.             Italic          =   0   'False
  861.             Strikethrough   =   0   'False
  862.          EndProperty
  863.          ForeColor       =   &H00000000&
  864.          Height          =   240
  865.          Index           =   0
  866.          Left            =   1560
  867.          TabIndex        =   26
  868.          Top             =   165
  869.          Width           =   150
  870.       End
  871.       Begin VB.Label lblScores 
  872.          BackColor       =   &H00C0C0C0&
  873.          BackStyle       =   0  'Transparent
  874.          Caption         =   "Six"
  875.          BeginProperty Font 
  876.             Name            =   "MS Sans Serif"
  877.             Size            =   9.75
  878.             Charset         =   0
  879.             Weight          =   700
  880.             Underline       =   0   'False
  881.             Italic          =   0   'False
  882.             Strikethrough   =   0   'False
  883.          EndProperty
  884.          Height          =   240
  885.          Index           =   5
  886.          Left            =   120
  887.          TabIndex        =   17
  888.          Top             =   1725
  889.          Width           =   1290
  890.       End
  891.       Begin VB.Label lblScores 
  892.          BackColor       =   &H00C0C0C0&
  893.          BackStyle       =   0  'Transparent
  894.          Caption         =   "Five"
  895.          BeginProperty Font 
  896.             Name            =   "MS Sans Serif"
  897.             Size            =   9.75
  898.             Charset         =   0
  899.             Weight          =   700
  900.             Underline       =   0   'False
  901.             Italic          =   0   'False
  902.             Strikethrough   =   0   'False
  903.          EndProperty
  904.          Height          =   240
  905.          Index           =   4
  906.          Left            =   120
  907.          TabIndex        =   16
  908.          Top             =   1410
  909.          Width           =   1425
  910.       End
  911.       Begin VB.Label lblScores 
  912.          BackColor       =   &H00C0C0C0&
  913.          BackStyle       =   0  'Transparent
  914.          Caption         =   "Four"
  915.          BeginProperty Font 
  916.             Name            =   "MS Sans Serif"
  917.             Size            =   9.75
  918.             Charset         =   0
  919.             Weight          =   700
  920.             Underline       =   0   'False
  921.             Italic          =   0   'False
  922.             Strikethrough   =   0   'False
  923.          EndProperty
  924.          Height          =   240
  925.          Index           =   3
  926.          Left            =   120
  927.          TabIndex        =   15
  928.          Top             =   1095
  929.          Width           =   1440
  930.       End
  931.       Begin VB.Label lblScores 
  932.          BackColor       =   &H00C0C0C0&
  933.          BackStyle       =   0  'Transparent
  934.          Caption         =   "Three"
  935.          BeginProperty Font 
  936.             Name            =   "MS Sans Serif"
  937.             Size            =   9.75
  938.             Charset         =   0
  939.             Weight          =   700
  940.             Underline       =   0   'False
  941.             Italic          =   0   'False
  942.             Strikethrough   =   0   'False
  943.          EndProperty
  944.          Height          =   240
  945.          Index           =   2
  946.          Left            =   120
  947.          TabIndex        =   14
  948.          Top             =   795
  949.          Width           =   1335
  950.       End
  951.       Begin VB.Label lblScores 
  952.          BackColor       =   &H00C0C0C0&
  953.          BackStyle       =   0  'Transparent
  954.          Caption         =   "Two"
  955.          BeginProperty Font 
  956.             Name            =   "MS Sans Serif"
  957.             Size            =   9.75
  958.             Charset         =   0
  959.             Weight          =   700
  960.             Underline       =   0   'False
  961.             Italic          =   0   'False
  962.             Strikethrough   =   0   'False
  963.          EndProperty
  964.          Height          =   240
  965.          Index           =   1
  966.          Left            =   120
  967.          TabIndex        =   13
  968.          Top             =   480
  969.          Width           =   1290
  970.       End
  971.       Begin VB.Label lblScores 
  972.          BackColor       =   &H00C0C0C0&
  973.          BackStyle       =   0  'Transparent
  974.          Caption         =   "Aces"
  975.          BeginProperty Font 
  976.             Name            =   "MS Sans Serif"
  977.             Size            =   9.75
  978.             Charset         =   0
  979.             Weight          =   700
  980.             Underline       =   0   'False
  981.             Italic          =   0   'False
  982.             Strikethrough   =   0   'False
  983.          EndProperty
  984.          Height          =   240
  985.          Index           =   0
  986.          Left            =   135
  987.          TabIndex        =   12
  988.          Top             =   180
  989.          Width           =   1260
  990.       End
  991.    End
  992.    Begin VB.Line Line1 
  993.       BorderColor     =   &H00808080&
  994.       Index           =   1
  995.       X1              =   0
  996.       X2              =   4800
  997.       Y1              =   30
  998.       Y2              =   30
  999.    End
  1000.    Begin VB.Image imgRoll 
  1001.       Height          =   330
  1002.       Left            =   3520
  1003.       Picture         =   "frmMain.frx":3A7E
  1004.       Top             =   1380
  1005.       Width           =   1095
  1006.    End
  1007.    Begin VB.Label lblGTotal 
  1008.       AutoSize        =   -1  'True
  1009.       BackColor       =   &H00C0C0C0&
  1010.       BackStyle       =   0  'Transparent
  1011.       Caption         =   "0"
  1012.       BeginProperty Font 
  1013.          Name            =   "MS Sans Serif"
  1014.          Size            =   9.75
  1015.          Charset         =   0
  1016.          Weight          =   700
  1017.          Underline       =   0   'False
  1018.          Italic          =   0   'False
  1019.          Strikethrough   =   0   'False
  1020.       EndProperty
  1021.       ForeColor       =   &H00000080&
  1022.       Height          =   240
  1023.       Left            =   4225
  1024.       TabIndex        =   31
  1025.       Top             =   4560
  1026.       Width           =   135
  1027.    End
  1028.    Begin VB.Label lblBonusCountDown 
  1029.       Alignment       =   2  'Center
  1030.       Appearance      =   0  'Flat
  1031.       AutoSize        =   -1  'True
  1032.       BackColor       =   &H00C0C0C0&
  1033.       BackStyle       =   0  'Transparent
  1034.       Caption         =   "-63"
  1035.       BeginProperty Font 
  1036.          Name            =   "MS Sans Serif"
  1037.          Size            =   9.75
  1038.          Charset         =   0
  1039.          Weight          =   700
  1040.          Underline       =   -1  'True
  1041.          Italic          =   0   'False
  1042.          Strikethrough   =   0   'False
  1043.       EndProperty
  1044.       ForeColor       =   &H00800080&
  1045.       Height          =   240
  1046.       Left            =   1005
  1047.       TabIndex        =   30
  1048.       Top             =   4560
  1049.       Width           =   330
  1050.    End
  1051.    Begin VB.Label lblLScoreTotal 
  1052.       AutoSize        =   -1  'True
  1053.       BackColor       =   &H00C0C0C0&
  1054.       BackStyle       =   0  'Transparent
  1055.       Caption         =   "0"
  1056.       BeginProperty Font 
  1057.          Name            =   "MS Sans Serif"
  1058.          Size            =   9.75
  1059.          Charset         =   0
  1060.          Weight          =   700
  1061.          Underline       =   0   'False
  1062.          Italic          =   0   'False
  1063.          Strikethrough   =   0   'False
  1064.       EndProperty
  1065.       ForeColor       =   &H00000000&
  1066.       Height          =   240
  1067.       Left            =   1680
  1068.       TabIndex        =   29
  1069.       Top             =   4200
  1070.       Width           =   135
  1071.    End
  1072.    Begin VB.Label lblScoreBonus 
  1073.       AutoSize        =   -1  'True
  1074.       BackColor       =   &H00C0C0C0&
  1075.       BackStyle       =   0  'Transparent
  1076.       Caption         =   "0"
  1077.       BeginProperty Font 
  1078.          Name            =   "MS Sans Serif"
  1079.          Size            =   9.75
  1080.          Charset         =   0
  1081.          Weight          =   700
  1082.          Underline       =   0   'False
  1083.          Italic          =   0   'False
  1084.          Strikethrough   =   0   'False
  1085.       EndProperty
  1086.       ForeColor       =   &H00000000&
  1087.       Height          =   240
  1088.       Left            =   1680
  1089.       TabIndex        =   28
  1090.       Top             =   4560
  1091.       Width           =   135
  1092.    End
  1093.    Begin VB.Label lblStatic 
  1094.       Appearance      =   0  'Flat
  1095.       AutoSize        =   -1  'True
  1096.       BackColor       =   &H00C0C0C0&
  1097.       BackStyle       =   0  'Transparent
  1098.       Caption         =   "Game Total"
  1099.       BeginProperty Font 
  1100.          Name            =   "MS Sans Serif"
  1101.          Size            =   9.75
  1102.          Charset         =   0
  1103.          Weight          =   700
  1104.          Underline       =   -1  'True
  1105.          Italic          =   0   'False
  1106.          Strikethrough   =   0   'False
  1107.       EndProperty
  1108.       ForeColor       =   &H00C00000&
  1109.       Height          =   240
  1110.       Index           =   3
  1111.       Left            =   2280
  1112.       TabIndex        =   11
  1113.       Top             =   4560
  1114.       Width           =   1230
  1115.    End
  1116.    Begin VB.Label lblStatic 
  1117.       Appearance      =   0  'Flat
  1118.       AutoSize        =   -1  'True
  1119.       BackColor       =   &H00C0C0C0&
  1120.       BackStyle       =   0  'Transparent
  1121.       Caption         =   "Bonus (     )"
  1122.       BeginProperty Font 
  1123.          Name            =   "MS Sans Serif"
  1124.          Size            =   9.75
  1125.          Charset         =   0
  1126.          Weight          =   700
  1127.          Underline       =   -1  'True
  1128.          Italic          =   0   'False
  1129.          Strikethrough   =   0   'False
  1130.       EndProperty
  1131.       ForeColor       =   &H00800080&
  1132.       Height          =   240
  1133.       Index           =   2
  1134.       Left            =   240
  1135.       TabIndex        =   10
  1136.       Top             =   4560
  1137.       Width           =   1170
  1138.    End
  1139.    Begin VB.Label lblStatic 
  1140.       Appearance      =   0  'Flat
  1141.       AutoSize        =   -1  'True
  1142.       BackColor       =   &H00C0C0C0&
  1143.       BackStyle       =   0  'Transparent
  1144.       Caption         =   "Total"
  1145.       BeginProperty Font 
  1146.          Name            =   "MS Sans Serif"
  1147.          Size            =   9.75
  1148.          Charset         =   0
  1149.          Weight          =   700
  1150.          Underline       =   -1  'True
  1151.          Italic          =   0   'False
  1152.          Strikethrough   =   0   'False
  1153.       EndProperty
  1154.       ForeColor       =   &H00C00000&
  1155.       Height          =   240
  1156.       Index           =   1
  1157.       Left            =   240
  1158.       TabIndex        =   9
  1159.       Top             =   4200
  1160.       Width           =   555
  1161.    End
  1162.    Begin VB.Line Line1 
  1163.       BorderColor     =   &H00E0E0E0&
  1164.       Index           =   0
  1165.       X1              =   0
  1166.       X2              =   4800
  1167.       Y1              =   45
  1168.       Y2              =   45
  1169.    End
  1170.    Begin VB.Menu mnuGameMain 
  1171.       Caption         =   "&Game"
  1172.       Begin VB.Menu mnuGame 
  1173.          Caption         =   "&New"
  1174.          Index           =   0
  1175.          Shortcut        =   {F2}
  1176.       End
  1177.       Begin VB.Menu mnuGame 
  1178.          Caption         =   "-"
  1179.          Index           =   1
  1180.       End
  1181.       Begin VB.Menu mnuGame 
  1182.          Caption         =   "&Undo Last"
  1183.          Index           =   2
  1184.          Shortcut        =   ^Z
  1185.       End
  1186.       Begin VB.Menu mnuGame 
  1187.          Caption         =   "-"
  1188.          Index           =   3
  1189.       End
  1190.       Begin VB.Menu mnuGame 
  1191.          Caption         =   "&Statistics"
  1192.          Index           =   4
  1193.          Shortcut        =   ^S
  1194.       End
  1195.       Begin VB.Menu mnuGame 
  1196.          Caption         =   "&High Score"
  1197.          Index           =   5
  1198.          Shortcut        =   ^H
  1199.       End
  1200.       Begin VB.Menu mnuGame 
  1201.          Caption         =   "-"
  1202.          Index           =   6
  1203.       End
  1204.       Begin VB.Menu mnuGame 
  1205.          Caption         =   "E&xit"
  1206.          Index           =   7
  1207.          Shortcut        =   ^X
  1208.       End
  1209.    End
  1210.    Begin VB.Menu mnuOptions 
  1211.       Caption         =   "&Options"
  1212.       Begin VB.Menu mnuSound 
  1213.          Caption         =   "&Sound"
  1214.          Checked         =   -1  'True
  1215.       End
  1216.    End
  1217.    Begin VB.Menu mnuHelpMain 
  1218.       Caption         =   "&Help"
  1219.       Begin VB.Menu mnuHelp 
  1220.          Caption         =   "Help &Contents"
  1221.          Index           =   0
  1222.          Shortcut        =   {F1}
  1223.       End
  1224.       Begin VB.Menu mnuHelp 
  1225.          Caption         =   "Help &Index"
  1226.          Index           =   1
  1227.       End
  1228.       Begin VB.Menu mnuHelp 
  1229.          Caption         =   "-"
  1230.          Index           =   2
  1231.       End
  1232.       Begin VB.Menu mnuHelp 
  1233.          Caption         =   "&About"
  1234.          Index           =   3
  1235.       End
  1236.    End
  1237. End
  1238. Attribute VB_Name = "frmMain"
  1239. Attribute VB_GlobalNameSpace = False
  1240. Attribute VB_Creatable = False
  1241. Attribute VB_PredeclaredId = True
  1242. Attribute VB_Exposed = False
  1243. '******************************************************************
  1244. '*  Name:    Yahtzee Deluxe (couldn't think of a better name)     *
  1245. '*  Author:  Shannon Harmon                                       *
  1246. '*  Email:   sharmon@microtechcomputers.com                       *
  1247. '*  Date:    March 3, 1999                                        *
  1248. '*  Updated: September 25, 1999                                   *
  1249. '*                                                                *
  1250. '*  Source Copyright - Shannon Harmon                             *
  1251. '*  Yahtzee is owned by Milton Bradley                            *
  1252. '*                                                                *
  1253. '*  Notice:  Made available only for personal (non commercial)    *
  1254. '*           use.  Do NOT try to sell this software, use only for *
  1255. '*           learning and ideas.  Source code made free available *
  1256. '*           to the public domain.  Please email me any updates   *
  1257. '*           you make and please keep this header with any source *
  1258. '*           you distribute.                                      *
  1259. '*                                                                *
  1260. '*  PS:  Help file class from http://www.vbexplorer.com           *
  1261. '*                                                                *
  1262. '******************************************************************
  1263.  
  1264. Option Explicit
  1265.  
  1266. Dim RollCount As Integer '//Track current round total rolls (max 3)
  1267. Dim die(4) As Integer '//Tracks dices number value
  1268. Dim uIndex As Integer '//Tracks last score clicked
  1269. Dim uGameTotal As Integer '//Tracks last total score before undo
  1270. Dim uBonus63 As Integer '//Tracks last bonus amount
  1271. Dim ulColTotal As Integer '//Tracks last left column total points
  1272. Dim uBonusCountDown As Integer '//Tracks last bonus countdown number
  1273. Dim uYatzeeBonus As Boolean '//Tracks if bonus yahtzee should test if undo mode
  1274. Dim uRollCount As Integer '//Tracks rollcount before undo
  1275. Private hHelp As New HTMLHelp '//Help class object
  1276. '
  1277.  
  1278. Private Sub Form_Load()
  1279.   
  1280.   Call CheckReg '//Check and setup registry
  1281.   Call NewGame '//Start new game
  1282.   
  1283. End Sub
  1284.  
  1285. Private Sub NewGame() '//Initialze new game
  1286. Dim i As Integer
  1287.     
  1288.   For i = 0 To 13 '//Disable and reset all scoreing buttons
  1289.     
  1290.     lblNums(i).Enabled = False
  1291.     lblNums(i) = "X"
  1292.     lblNums(i).FontStrikethru = False
  1293.     lblScores(i).Enabled = False
  1294.     lblScores(i).FontStrikethru = False
  1295.   
  1296.   Next i
  1297.  
  1298.   Bonus63 = 0 '//Reset score variables
  1299.   lColTotal = 0
  1300.   rColTotal = 0
  1301.   GameTotal = 0
  1302.     
  1303.   lblScoreBonus = "0" '//Left Column bonus score
  1304.   lblLScoreTotal = "0" '//Left Column Score total
  1305.   lblGTotal = "0" '//Game total
  1306.   lblBonusCountDown = "-63" '//Amount left till bonus available
  1307.   pBar.Value = 0 '//Total Roll Progress Bar
  1308.   lblRollNumber = "0" '//Visible Text Roll Number Counter
  1309.   RollCount = 0 '//Actual Roll Counter Variable
  1310.   imgRoll.Enabled = True '//Enable clicking of the Roll Button
  1311.   imgRoll.Picture = ImageList1.ListImages(2).Picture '//Set picture to normal
  1312.     
  1313.   For i = 0 To 4
  1314.     
  1315.     imgDice(i).Picture = ilDice.ListImages(1).Picture '//Set dice pics to #1
  1316.     chkDice(i).Enabled = False '//Disable dice checkboxes
  1317.     chkDice(i).Value = 0 '//Set dice checkboxes to greyed
  1318.     labClick(i).Enabled = False '//Disable top labels over dice
  1319.   
  1320.   Next i
  1321.   
  1322.   '//Undo variables
  1323.   mnuGame(2).Enabled = False '//Disable undo menu item
  1324.   uGameTotal = 0
  1325.   uBonusCountDown = 0
  1326.   uBonus63 = 0
  1327.   ulColTotal = 0
  1328.   uYatzeeBonus = False
  1329.     
  1330. End Sub
  1331.  
  1332. Private Sub Roll() '//Roll Dice
  1333. Dim i As Integer, j As Integer
  1334.     
  1335.   If pBar.Value = 0 Then '//If first roll of game enable all score values
  1336.  
  1337.     For i = 0 To 13
  1338.  
  1339.       lblNums(i).Enabled = True
  1340.       lblScores(i).Enabled = True
  1341.  
  1342.     Next i
  1343.  
  1344.   End If
  1345.         
  1346.   Randomize  '//Initializes the random-number generator.
  1347.   
  1348.   For i = 0 To 4
  1349.     
  1350.     j = (Int(6 * Rnd)) '//Set j to random number between 1 and 6
  1351.     chkDice(i).Enabled = True '//Enable dice checkboxes
  1352.     
  1353.     '//Set enabled checkbox dice pictures to correct number
  1354.     '//If it's 0 we know it's not been checked
  1355.     If chkDice(i).Value = 0 Then imgDice(i).Picture = ilDice.ListImages(j + 1).Picture
  1356.     
  1357.     '//Set our variable so we know what the last roll dice value was...
  1358.     '//If it's 0 we know it's not been checked
  1359.     If chkDice(i).Value = 0 Then die(i) = j + 1
  1360.   
  1361.   Next i
  1362.     
  1363.   If RollCount = 3 Then '//Turn is over
  1364.     
  1365.     imgRoll.Enabled = False '//Disable Roll button
  1366.     imgRoll.Picture = ImageList1.ListImages(7).Picture '//Change to disabled pic
  1367.     
  1368.     For i = 0 To 4
  1369.       
  1370.       chkDice(i).Value = 2 '//Set all checkboxes to selected
  1371.       chkDice(i).Enabled = False '//Disable all checkboxes
  1372.       labClick(i).Enabled = False '//Disable all dice covering labels
  1373.     
  1374.     Next i
  1375.     
  1376.     RollCount = 0 '//Set our roll count back to zero
  1377.   
  1378.   End If
  1379.     
  1380.   Call CheckAllScores
  1381.     
  1382. End Sub
  1383.  
  1384. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  1385.   
  1386.   hHelp.HHClose '//Close our help class
  1387.   Set hHelp = Nothing '//Give back it's memory
  1388.  
  1389. End Sub
  1390.  
  1391. Private Sub Form_Unload(Cancel As Integer)
  1392. Dim i As Integer
  1393.  
  1394.   '//Close all sub forms if any open
  1395.   For i = Forms.Count - 1 To 1 Step -1
  1396.     Unload Forms(i)
  1397.   Next
  1398.   
  1399.   '//Save screen position
  1400.   If Me.WindowState <> vbMinimized Then
  1401.         
  1402.     SaveSetting MyApp, "Settings", "MainLeft", Me.Left '//Forms left position
  1403.     SaveSetting MyApp, "Settings", "MainTop", Me.Top '//Forms top position
  1404.   
  1405.   End If
  1406.  
  1407. End Sub
  1408.  
  1409. Private Sub imgRoll_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
  1410.   
  1411.   If Button = 2 Then Exit Sub '//If it's the right mouse button just exit
  1412.   
  1413.   If mnuSound.Checked Then PlaySound App.Path & "\roll.wav" '//Play sound if available
  1414.   
  1415.   imgRoll.Picture = ImageList1.ListImages(1).Picture '//Change pic to down picture
  1416.   
  1417. End Sub
  1418.  
  1419. Private Sub imgRoll_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
  1420.   
  1421.   If Button = 2 Then Exit Sub '//If it's the right mouse button just exit
  1422.   
  1423.   imgRoll.Picture = ImageList1.ListImages(2).Picture '//Change pic to up picture
  1424.   
  1425. End Sub
  1426.  
  1427. Private Sub imgRoll_Click()
  1428. Dim i As Integer
  1429.  
  1430.   mnuGame(2).Enabled = False '//Disable undo menu item
  1431.   
  1432.   If RollCount = 0 Then '//First roll of turn
  1433.     
  1434.     For i = 0 To 4
  1435.       
  1436.       chkDice(i).Value = 0 '//Reset checkboxes to zero
  1437.       chkDice(i).Enabled = True '//Allow clicking of checkboxes
  1438.       labClick(i).Enabled = True '//Allow clicking of dice label covers
  1439.     
  1440.     Next
  1441.   
  1442.   End If
  1443.   
  1444.   RollCount = RollCount + 1 '//Update our roll count
  1445.   lblRollNumber = RollCount '//Update our visible roll count
  1446.    
  1447.   Call Roll '//Do the dice roll subroutine
  1448.    
  1449. End Sub
  1450.  
  1451. Private Sub labClick_Click(Index As Integer)
  1452.  
  1453.   '//Set value to opposite
  1454.   If chkDice(Index).Value = 0 Then chkDice(Index).Value = 1: Exit Sub
  1455.   
  1456.   If chkDice(Index).Value = 1 Then chkDice(Index).Value = 0
  1457.  
  1458. End Sub
  1459.  
  1460. Private Sub lblNums_Click(Index As Integer)
  1461.   
  1462.   Call lblScores_Click(Index) '//Do same thing as lblscores_click
  1463.  
  1464. End Sub
  1465.  
  1466. Private Sub UndoPlay()
  1467. Dim i As Integer
  1468.   
  1469.   mnuGame(2).Enabled = False '//Disable undo menu item
  1470.   
  1471.   If uIndex = 11 Then
  1472.   
  1473.     lblNums(13).Enabled = True '//Set bonus yahtzee to available again
  1474.     lblNums(13) = "X"
  1475.     lblScores(13).Enabled = True
  1476.   
  1477.   End If
  1478.   
  1479.   '//Reset item score number
  1480.   With lblNums(uIndex)
  1481.     
  1482.     .Caption = "X"
  1483.     .FontStrikethru = False
  1484.     .Enabled = True
  1485.   
  1486.   End With
  1487.   
  1488.   '//Reset item text
  1489.   With lblScores(uIndex)
  1490.     
  1491.     .FontStrikethru = False
  1492.     .Enabled = True
  1493.   
  1494.   End With
  1495.   
  1496.   If pBar.Value <> 0 Then pBar.Value = pBar.Value - 1 '//Move pBar.Value back
  1497.   
  1498.   lblGTotal = uGameTotal '//Move last score back
  1499.   lblBonusCountDown = uBonusCountDown '//Set bonus countdown amount back
  1500.   lblScoreBonus = uBonus63 '//Set bonus back to last state
  1501.   lblLScoreTotal = ulColTotal '//Set left column total back
  1502.   uYatzeeBonus = True '//Let's check all scores no we are calling it from an undo
  1503.   
  1504.   If uRollCount <> 3 And uRollCount <> 0 Then '//Allows for roll again if not last turn
  1505.     
  1506.     RollCount = uRollCount '//Restores old roll number
  1507.     lblRollNumber = RollCount '//Makes roll number visible to user
  1508.     imgRoll.Enabled = True '//Enable Roll button incase it was off
  1509.     imgRoll.Picture = ImageList1.ListImages(2).Picture '//Reset picture to default
  1510.     
  1511.     For i = 0 To 4
  1512.     
  1513.       chkDice(i).Enabled = True '//Allow clicking of checkboxes
  1514.       labClick(i).Enabled = True '//Allow clicking of dice label covers
  1515.     
  1516.     Next i
  1517.     
  1518.   Else '//Turn was last so keep roll button disabled
  1519.   
  1520.     imgRoll.Enabled = False '//Disable Roll button incase it was off
  1521.     imgRoll.Picture = ImageList1.ListImages(7).Picture '//Reset picture to done
  1522.   End If
  1523.   
  1524.   Call CheckAllScores '//Update available scoring positions
  1525.   
  1526. End Sub
  1527.  
  1528. Private Sub lblScores_Click(Index As Integer)
  1529. Dim i As Integer
  1530.  
  1531.  
  1532.   If Index = 13 Then Exit Sub '//Bonus yahtzee - not a user clickable score
  1533.   
  1534.   If lblNums(Index) = "X" Then Exit Sub '//Exit if we clicked an unusable one
  1535.   
  1536.   '//Undo routine items
  1537.   uIndex = Index '//Track clicked item for undo routine
  1538.   mnuGame(2).Enabled = True '//Enable undo menu item
  1539.   uGameTotal = lblGTotal '//Tracks last game total
  1540.   uBonusCountDown = lblBonusCountDown '//Tracks bonus countdown amount
  1541.   uBonus63 = lblScoreBonus '//Tracks bonus amount
  1542.   ulColTotal = lblLScoreTotal '//Tracks left score total
  1543.   uYatzeeBonus = False '//Resets undo mode tracker to false
  1544.   uRollCount = RollCount '//Tracks roll number
  1545.   
  1546.   For i = 0 To 4
  1547.     
  1548.     chkDice(i).Enabled = False '//Not allow clicking of checkboxes
  1549.     labClick(i).Enabled = False '//Not allow clicking of dice label covers
  1550.  
  1551.   Next i
  1552.   
  1553.   lblScores(Index).Enabled = False '//Disable this item
  1554.   lblScores(Index).FontStrikethru = True '//Add font strikethrou so we know it's used
  1555.   lblNums(Index).Enabled = False '//Disable this item
  1556.   lblNums(Index).FontStrikethru = True '//Add font strikethrou so we know it's used
  1557.      
  1558.   lblLScoreTotal = 0 '//Reset left scoring column to zero
  1559.   rColTotal = 0 '//Reset left scoring column to zero
  1560.   
  1561.   '//Process for all score clicks
  1562.   
  1563.   '//---Left columns
  1564.   For i = 0 To 5
  1565.     
  1566.     If lblNums(i).Enabled = False Then '//Only used disabled items for scoring
  1567.       
  1568.       lblLScoreTotal = CStr(Int(lblLScoreTotal) + Int(lblNums(i))) '//Show left column score
  1569.       lColTotal = Int(lblLScoreTotal) '//Total left column score
  1570.     
  1571.     End If
  1572.     
  1573.     If lblNums(i).Enabled = True Then '//It's not been used, set it back to normal
  1574.       
  1575.       lblNums(i) = "X" '//This isn't used yet so put value back to "X"
  1576.     
  1577.     End If
  1578.     
  1579.     lblNums(i).ForeColor = vbBlack '//Reset scoreing colors back to black
  1580.   
  1581.   Next i
  1582.   
  1583.   If lColTotal >= 63 Then '//Bonus available
  1584.     
  1585.     lblScoreBonus = 35 '//They got their bonus, set the value
  1586.     Bonus63 = 35 '//Variable to hold the bonus amount
  1587.     lblBonusCountDown = 0 '//Show 0 since they got the bonus
  1588.   
  1589.   Else '//No bonus available
  1590.     
  1591.     lblScoreBonus = 0 '//No bonus yet, keep at zero
  1592.     Bonus63 = 0 '//Variable to hold the bonus amount
  1593.     lblBonusCountDown = -63 + lColTotal '//Tell how much is left to go till bonus
  1594.   
  1595.   End If
  1596.   '//---End Left columns
  1597.   
  1598.   '//---Right columns
  1599.   For i = 6 To 12
  1600.     
  1601.     If lblNums(i).Enabled = False Then '//Only use disabled items to score
  1602.       
  1603.       rColTotal = rColTotal + Int(lblNums(i)) '//Add right column total
  1604.     
  1605.     End If '//If enabled set it back to default
  1606.     
  1607.     If lblNums(i).Enabled Then lblNums(i) = "X" '//Not used so put back to "X"
  1608.     
  1609.     lblNums(i).ForeColor = vbBlack '//Reset scoreing colors back to black
  1610.   
  1611.   Next i
  1612.   
  1613.   '//Add in the bonus yahtzee if there...
  1614.   If lblNums(13).Enabled = True Then
  1615.     
  1616.     If lblNums(11).Enabled = False And lblNums(11) = "0" Then '//Yahtzee is used and 0
  1617.       
  1618.       lblNums(13).Enabled = False '//Disable bonus yahtzee
  1619.       lblScores(13).Enabled = False '//Disable bonus yahtzee
  1620.       lblNums(13) = 0 '//Set bonus yahtzee score to zero
  1621.     
  1622.     End If
  1623.   
  1624.   End If
  1625.   
  1626.   '//Set bonus yahtzee score to 0 if last turn and no bonus still
  1627.   If lblNums(13) = "X" And pBar.Value = 13 Then
  1628.     
  1629.     lblNums(13) = 0 '//Set it to zero score
  1630.     lblNums(13).Enabled = False '//Disable
  1631.     lblScores(13).Enabled = False '//Disable
  1632.   
  1633.   End If
  1634.   
  1635.   If lblNums(13) <> "X" Then rColTotal = rColTotal + Int(lblNums(13)) '//Add yahtzee bonus total to score
  1636.   '//---End right columns
  1637.   
  1638.   GameTotal = (Bonus63 + lColTotal + rColTotal) '//Game score total
  1639.   lblGTotal = GameTotal '//Form visible game score total label
  1640.   
  1641.   If pBar.Value = 12 Then '//Game is over
  1642.   
  1643.     pBar.Value = pBar.Value + 1 '//Fill progress bar to max level
  1644.     
  1645.     If CheckForHS = False Then '//Sub to determine if score is in top 5
  1646.       
  1647.       frmGameOver.Show vbModal '//Score was lower then top 5 show game over form
  1648.     
  1649.     Else '//Score was in top 5
  1650.     
  1651.       If frmMain.mnuSound.Checked Then PlaySound App.Path & "\Excited.wav" '//Sound:)
  1652.       
  1653.       frmHighScore.Show vbModal '//If score was in top 5 show high score form
  1654.     
  1655.     End If
  1656.       
  1657.     Call UpdateStats(GameTotal)  '//Add this game to the statistics
  1658.     Call NewGame '//Reset game to new
  1659.     
  1660.     Exit Sub
  1661.   
  1662.   End If
  1663.   
  1664.   imgRoll.Enabled = True '//Enable Roll button incase it was off
  1665.   imgRoll.Picture = ImageList1.ListImages(2).Picture '//Reset picture to default
  1666.   lblRollNumber = 0 '//Set roll count back to zero
  1667.   RollCount = 0 '//Set our roll count back to zero
  1668.   pBar.Value = pBar.Value + 1 '//Update game progress bar
  1669.  
  1670. End Sub
  1671.  
  1672. Private Sub mnuGame_Click(Index As Integer)
  1673.   
  1674.   Select Case Index
  1675.        
  1676.     Case 0
  1677.       NewGame '//Start game over...
  1678.     
  1679.     Case 2
  1680.       Call UndoPlay '//Undo last score click...
  1681.     
  1682.     Case 4
  1683.       frmStats.Show vbModal '//Show statistics form
  1684.     
  1685.     Case 5
  1686.       frmHighScore.Show vbModal '//Show high scores form
  1687.     
  1688.     Case 7
  1689.       Unload Me '//Exit program
  1690.       End '//Just incase
  1691.     
  1692.   End Select
  1693.   
  1694. End Sub
  1695.  
  1696. Private Sub mnuHelp_Click(Index As Integer)
  1697.   
  1698.   Select Case Index
  1699.   
  1700.     '//Show help file
  1701.     Case 0
  1702.       
  1703.       With hHelp '//Help contents
  1704.        .CHMFile = App.Path & "\yahtzee.chm"
  1705.        .HHWindow = ""
  1706.        .HHDisplayContents
  1707.       End With
  1708.       
  1709.     Case 1
  1710.       
  1711.       With hHelp '//Help index
  1712.         .CHMFile = App.Path & "\yahtzee.chm"
  1713.         .HHWindow = ""
  1714.         .HHDisplayIndex
  1715.       End With
  1716.  
  1717.     Case 3
  1718.       frmAbout.Show vbModal '//Show about form
  1719.     
  1720.   End Select
  1721.   
  1722. End Sub
  1723.  
  1724. Private Sub mnuSound_Click() '//Toggle sound on or off
  1725.   
  1726.   mnuSound.Checked = Not mnuSound.Checked '//Set to opposite value
  1727.   SaveSetting MyApp, "Settings", "Sound", mnuSound.Checked  '//Save to registry
  1728.  
  1729. End Sub
  1730.  
  1731. Private Sub CheckAllScores()
  1732. ''//Hard to comment, hope you can understand this one!
  1733. '//This routine checks to see which scores can go where!
  1734. Dim i As Integer, j As Integer
  1735. Dim tmp As Integer
  1736. Dim RoundScore As Integer
  1737. Dim iPar As Boolean, iTriss As Boolean
  1738.  
  1739.   '//---Do left column numbers
  1740.   For i = 0 To 5
  1741.     
  1742.     tmp = 0
  1743.   
  1744.     If lblNums(i).Enabled = True Then '//Only check scores that are enabled
  1745.       
  1746.       For j = 0 To 4
  1747.         
  1748.         If die(j) = i + 1 Then tmp = tmp + (i + 1)
  1749.         
  1750.         lblNums(i) = tmp '//Update label with correct score value
  1751.       
  1752.       Next j
  1753.     
  1754.     End If
  1755.   
  1756.   Next i
  1757.   '//---End of left column numbers
  1758.  
  1759.   '//---Three of a kind
  1760.   If lblNums(6).Enabled = True Then
  1761.     
  1762.     For i = 0 To 5
  1763.       
  1764.       tmp = 0
  1765.       
  1766.       For j = 0 To 4
  1767.       
  1768.         If imgDice(j).Picture = ilDice.ListImages(i + 1).Picture Then tmp = tmp + 1
  1769.       
  1770.       Next j
  1771.     
  1772.     If tmp >= 3 Then
  1773.       
  1774.       lblNums(6) = die(0) + die(1) + die(2) + die(3) + die(4)
  1775.       Exit For
  1776.     
  1777.     Else
  1778.     
  1779.     lblNums(6) = 0
  1780.     
  1781.     End If
  1782.     
  1783.     Next i
  1784.   End If
  1785.   '//---End three of a kind
  1786.  
  1787.   '//---Four of a kind
  1788.   If lblNums(7).Enabled = True Then
  1789.     
  1790.     For i = 0 To 5
  1791.       
  1792.       tmp = 0
  1793.     
  1794.       For j = 0 To 4
  1795.       
  1796.         If imgDice(j).Picture = ilDice.ListImages(i + 1).Picture Then tmp = tmp + 1
  1797.       
  1798.       Next j
  1799.     
  1800.       If tmp >= 4 Then
  1801.         
  1802.         lblNums(7) = die(0) + die(1) + die(2) + die(3) + die(4)
  1803.         Exit For
  1804.       
  1805.       Else
  1806.       
  1807.         lblNums(7) = 0
  1808.       
  1809.       End If
  1810.     
  1811.     Next i
  1812.  
  1813.   End If
  1814.   '//---End four of a kind
  1815.  
  1816.   '//---Full house
  1817.   If lblNums(8).Enabled = True Then
  1818.     
  1819.     iPar = False
  1820.     iTriss = False
  1821.  
  1822.     For i = 0 To 5
  1823.       
  1824.       tmp = 0
  1825.       
  1826.       For j = 0 To 4
  1827.       
  1828.         If imgDice(j).Picture = ilDice.ListImages(i + 1).Picture Then tmp = tmp + 1
  1829.       
  1830.       Next j
  1831.     
  1832.       If tmp = 2 Then
  1833.         
  1834.         RoundScore = RoundScore + (i + 1) * 2
  1835.         iPar = True
  1836.       
  1837.       End If
  1838.             
  1839.       If tmp = 3 Then
  1840.       
  1841.         RoundScore = RoundScore + (i + 1) * 3
  1842.         iTriss = True
  1843.       
  1844.       End If
  1845.  
  1846.   Next i
  1847.  
  1848.   RoundScore = 25
  1849.   
  1850.   If Not iPar Or Not iTriss Then RoundScore = 0
  1851.   
  1852.   lblNums(8) = RoundScore
  1853.   
  1854.   End If
  1855.   '//---End full house
  1856.  
  1857.   '//---Small straight
  1858.   If lblNums(9).Enabled = True Then
  1859.     
  1860.     Dim a As Integer, b As Integer, c As Integer
  1861.     Dim d As Integer, e As Integer, g As Integer
  1862.     a = 9: b = 9: c = 9: d = 9: e = 9: g = 9
  1863.     lblNums(9) = 0
  1864.   
  1865.     For i = 0 To 4
  1866.       
  1867.       If die(i) = 1 Then a = 0
  1868.       If die(i) = 2 Then b = 1
  1869.       If die(i) = 3 Then c = 2
  1870.       If die(i) = 4 Then d = 3
  1871.       If die(i) = 5 Then e = 4
  1872.       If die(i) = 6 Then g = 5
  1873.     
  1874.     Next i
  1875.  
  1876.     If a = 0 And b = 1 And c = 2 And d = 3 Then lblNums(9) = 30
  1877.     If b = 1 And c = 2 And d = 3 And e = 4 Then lblNums(9) = 30
  1878.     If c = 2 And d = 3 And e = 4 And g = 5 Then lblNums(9) = 30
  1879.  
  1880.   End If
  1881.   '//---End small straight
  1882.  
  1883.   '//---Large straight
  1884.   If lblNums(10).Enabled = True Then
  1885.    
  1886.     lblNums(10) = 40
  1887.  
  1888.     For i = 0 To 4
  1889.     
  1890.       For j = 0 To 4
  1891.         
  1892.         If Not i = j Then
  1893.           
  1894.           If imgDice(i).Picture = imgDice(j).Picture Or _
  1895.           imgDice(i).Picture = ilDice.ListImages(1).Picture And imgDice(j).Picture = ilDice.ListImages(6).Picture Then _
  1896.           lblNums(10) = 0
  1897.       
  1898.         End If
  1899.       
  1900.       Next j
  1901.     
  1902.     Next i
  1903.   
  1904.   End If
  1905.   '//--End large straight
  1906.  
  1907.   '//---Yahtzee
  1908.   If lblNums(11).Enabled = True Then
  1909.     
  1910.     If die(0) = die(1) And die(0) = die(2) And die(0) = die(3) And die(0) = die(4) Then
  1911.       
  1912.       lblNums(11) = 50
  1913.       
  1914.       If mnuSound.Checked Then PlaySound App.Path & "\Tada.wav" 'Play sound if available
  1915.     
  1916.     Else
  1917.       
  1918.       lblNums(11) = 0
  1919.     
  1920.     End If
  1921.   
  1922.   End If
  1923.   '//---End yahtzee
  1924.  
  1925.   '//---Chance
  1926.   If lblNums(12).Enabled = True Then
  1927.   
  1928.     lblNums(12) = 0
  1929.     
  1930.     For i = 0 To 4
  1931.       
  1932.       lblNums(12) = lblNums(12) + die(i)
  1933.     
  1934.     Next i
  1935.   
  1936.   End If
  1937.   '//---End chance
  1938.  
  1939.   '//---If it's a yahtzee then we need to allow total item value if used there
  1940.   If die(0) = die(1) And die(0) = die(2) And die(0) = die(3) And die(0) = die(4) Then
  1941.     
  1942.     If lblNums(13).Enabled = False Then GoTo SkipMe '//Bonus has been closed
  1943.     
  1944.     '//Left Columns
  1945.     For i = 0 To 5
  1946.       
  1947.       If lblNums(i).Enabled = True Then
  1948.         
  1949.         lblNums(i) = (i + 1) * 5
  1950.       
  1951.       End If
  1952.     
  1953.     Next i
  1954.   
  1955.     '//Three of a kind
  1956.     If lblNums(6).Enabled = True Then lblNums(6) = die(0) * 5
  1957.   
  1958.     '//Four of a kind
  1959.     If lblNums(7).Enabled = True Then lblNums(7) = die(0) * 5
  1960.   
  1961.     '//Full house
  1962.     If lblNums(8).Enabled = True Then lblNums(8) = 25
  1963.   
  1964.     '//Small straight
  1965.     If lblNums(9).Enabled = True Then lblNums(9) = 30
  1966.   
  1967.     '//Large straight
  1968.     If lblNums(10).Enabled = True Then lblNums(10) = 40
  1969.   
  1970.     '//Bonus Yahtzee
  1971.     If uYatzeeBonus = False Then
  1972.       
  1973.       If lblNums(11).Enabled = False And lblNums(11) = "50" Then
  1974.       
  1975.         If mnuSound.Checked Then PlaySound App.Path & "\Tada.wav" '//Play sound if available
  1976.       
  1977.         If lblNums(13).Enabled = True Then
  1978.       
  1979.           If lblNums(13) = "X" Then
  1980.         
  1981.             lblNums(13) = 100
  1982.       
  1983.           Else
  1984.         
  1985.             lblNums(13) = CStr(Int(lblNums(13) + 100))
  1986.       
  1987.           End If
  1988.     
  1989.         End If
  1990.   
  1991.       End If
  1992.   
  1993.     End If
  1994.   
  1995.   End If
  1996.   
  1997. SkipMe:
  1998.  
  1999.   '//Set all enabled items to blue
  2000.   For i = 0 To 12
  2001.     
  2002.     If lblNums(i).Enabled = True Then lblNums(i).ForeColor = vbBlue
  2003.   
  2004.   Next i
  2005.  
  2006. End Sub
  2007.  
  2008.  
  2009.  
  2010.